<?php
	/**
	 * This is a MetaControl class, providing a QForm or QPanel access to event handlers
	 * and QControls to perform the Create, Edit, and Delete functionality
	 * of the TableUserStat class.  This code-generated class
	 * contains all the basic elements to help a QPanel or QForm display an HTML form that can
	 * manipulate a single TableUserStat object.
	 *
	 * To take advantage of some (or all) of these control objects, you
	 * must create a new QForm or QPanel which instantiates a TableUserStatMetaControl
	 * class.
	 *
	 * Any and all changes to this file will be overwritten with any subsequent
	 * code re-generation.
	 * 
	 * @package My Application
	 * @subpackage MetaControls
	 * property-read TableUserStat $TableUserStat the actual TableUserStat data class being edited
	 * property QLabel $IdControl
	 * property-read QLabel $IdLabel
	 * property QListBox $UserIdControl
	 * property-read QLabel $UserIdLabel
	 * property QFloatTextBox $RateAverageAsBuyerControl
	 * property-read QLabel $RateAverageAsBuyerLabel
	 * property QFloatTextBox $Rate1AverageAsBuyerControl
	 * property-read QLabel $Rate1AverageAsBuyerLabel
	 * property QFloatTextBox $Rate2AverageAsBuyerControl
	 * property-read QLabel $Rate2AverageAsBuyerLabel
	 * property QFloatTextBox $Rate3AverageAsBuyerControl
	 * property-read QLabel $Rate3AverageAsBuyerLabel
	 * property QFloatTextBox $Rate4AverageAsBuyerControl
	 * property-read QLabel $Rate4AverageAsBuyerLabel
	 * property QFloatTextBox $Rate5AverageAsBuyerControl
	 * property-read QLabel $Rate5AverageAsBuyerLabel
	 * property QFloatTextBox $Rate6AverageAsBuyerControl
	 * property-read QLabel $Rate6AverageAsBuyerLabel
	 * property QFloatTextBox $RateAverageAsProviderControl
	 * property-read QLabel $RateAverageAsProviderLabel
	 * property QFloatTextBox $Rate1AverageAsProviderControl
	 * property-read QLabel $Rate1AverageAsProviderLabel
	 * property QFloatTextBox $Rate2AverageAsProviderControl
	 * property-read QLabel $Rate2AverageAsProviderLabel
	 * property QFloatTextBox $Rate3AverageAsProviderControl
	 * property-read QLabel $Rate3AverageAsProviderLabel
	 * property QFloatTextBox $Rate4AverageAsProviderControl
	 * property-read QLabel $Rate4AverageAsProviderLabel
	 * property QFloatTextBox $Rate5AverageAsProviderControl
	 * property-read QLabel $Rate5AverageAsProviderLabel
	 * property QFloatTextBox $Rate6AverageAsProviderControl
	 * property-read QLabel $Rate6AverageAsProviderLabel
	 * property QIntegerTextBox $BudgetTotalControl
	 * property-read QLabel $BudgetTotalLabel
	 * property QIntegerTextBox $PaidTotalControl
	 * property-read QLabel $PaidTotalLabel
	 * property QIntegerTextBox $EarnTotalControl
	 * property-read QLabel $EarnTotalLabel
	 * property QIntegerTextBox $BidTotalControl
	 * property-read QLabel $BidTotalLabel
	 * property QIntegerTextBox $DaysTotalControl
	 * property-read QLabel $DaysTotalLabel
	 * property QIntegerTextBox $DaysFinalTotalControl
	 * property-read QLabel $DaysFinalTotalLabel
	 * property QFloatTextBox $RatioBudgetPaidControl
	 * property-read QLabel $RatioBudgetPaidLabel
	 * property QFloatTextBox $RatioBidEarnControl
	 * property-read QLabel $RatioBidEarnLabel
	 * property QFloatTextBox $RatioDaysControl
	 * property-read QLabel $RatioDaysLabel
	 * property QDateTimePicker $UpdateDateControl
	 * property-read QLabel $UpdateDateLabel
	 * property-read string $TitleVerb a verb indicating whether or not this is being edited or created
	 * property-read boolean $EditMode a boolean indicating whether or not this is being edited or created
	 */

	class TableUserStatMetaControlGen extends QBaseClass {
		// General Variables
		protected $objTableUserStat;
		protected $objParentObject;
		protected $strTitleVerb;
		protected $blnEditMode;

		// Controls that allow the editing of TableUserStat's individual data fields
		protected $lblId;
		protected $lstUser;
		protected $txtRateAverageAsBuyer;
		protected $txtRate1AverageAsBuyer;
		protected $txtRate2AverageAsBuyer;
		protected $txtRate3AverageAsBuyer;
		protected $txtRate4AverageAsBuyer;
		protected $txtRate5AverageAsBuyer;
		protected $txtRate6AverageAsBuyer;
		protected $txtRateAverageAsProvider;
		protected $txtRate1AverageAsProvider;
		protected $txtRate2AverageAsProvider;
		protected $txtRate3AverageAsProvider;
		protected $txtRate4AverageAsProvider;
		protected $txtRate5AverageAsProvider;
		protected $txtRate6AverageAsProvider;
		protected $txtBudgetTotal;
		protected $txtPaidTotal;
		protected $txtEarnTotal;
		protected $txtBidTotal;
		protected $txtDaysTotal;
		protected $txtDaysFinalTotal;
		protected $txtRatioBudgetPaid;
		protected $txtRatioBidEarn;
		protected $txtRatioDays;
		protected $calUpdateDate;

		// Controls that allow the viewing of TableUserStat's individual data fields
		protected $lblUserId;
		protected $lblRateAverageAsBuyer;
		protected $lblRate1AverageAsBuyer;
		protected $lblRate2AverageAsBuyer;
		protected $lblRate3AverageAsBuyer;
		protected $lblRate4AverageAsBuyer;
		protected $lblRate5AverageAsBuyer;
		protected $lblRate6AverageAsBuyer;
		protected $lblRateAverageAsProvider;
		protected $lblRate1AverageAsProvider;
		protected $lblRate2AverageAsProvider;
		protected $lblRate3AverageAsProvider;
		protected $lblRate4AverageAsProvider;
		protected $lblRate5AverageAsProvider;
		protected $lblRate6AverageAsProvider;
		protected $lblBudgetTotal;
		protected $lblPaidTotal;
		protected $lblEarnTotal;
		protected $lblBidTotal;
		protected $lblDaysTotal;
		protected $lblDaysFinalTotal;
		protected $lblRatioBudgetPaid;
		protected $lblRatioBidEarn;
		protected $lblRatioDays;
		protected $lblUpdateDate;

		// QListBox Controls (if applicable) to edit Unique ReverseReferences and ManyToMany References

		// QLabel Controls (if applicable) to view Unique ReverseReferences and ManyToMany References


		/**
		 * Main constructor.  Constructor OR static create methods are designed to be called in either
		 * a parent QPanel or the main QForm when wanting to create a
		 * TableUserStatMetaControl to edit a single TableUserStat object within the
		 * QPanel or QForm.
		 *
		 * This constructor takes in a single TableUserStat object, while any of the static
		 * create methods below can be used to construct based off of individual PK ID(s).
		 *
		 * @param mixed $objParentObject QForm or QPanel which will be using this TableUserStatMetaControl
		 * @param TableUserStat $objTableUserStat new or existing TableUserStat object
		 */
		 public function __construct($objParentObject, TableUserStat $objTableUserStat) {
			// Setup Parent Object (e.g. QForm or QPanel which will be using this TableUserStatMetaControl)
			$this->objParentObject = $objParentObject;

			// Setup linked TableUserStat object
			$this->objTableUserStat = $objTableUserStat;

			// Figure out if we're Editing or Creating New
			if ($this->objTableUserStat->__Restored) {
				$this->strTitleVerb = QApplication::Translate('Edit');
				$this->blnEditMode = true;
			} else {
				$this->strTitleVerb = QApplication::Translate('Create');
				$this->blnEditMode = false;
			}
		 }

		/**
		 * Static Helper Method to Create using PK arguments
		 * You must pass in the PK arguments on an object to load, or leave it blank to create a new one.
		 * If you want to load via QueryString or PathInfo, use the CreateFromQueryString or CreateFromPathInfo
		 * static helper methods.  Finally, specify a CreateType to define whether or not we are only allowed to 
		 * edit, or if we are also allowed to create a new one, etc.
		 * 
		 * @param mixed $objParentObject QForm or QPanel which will be using this TableUserStatMetaControl
		 * @param integer $intId primary key value
		 * @param QMetaControlCreateType $intCreateType rules governing TableUserStat object creation - defaults to CreateOrEdit
 		 * @return TableUserStatMetaControl
		 */
		public static function Create($objParentObject, $intId = null, $intCreateType = QMetaControlCreateType::CreateOrEdit) {
			// Attempt to Load from PK Arguments
			if (strlen($intId)) {
				$objTableUserStat = TableUserStat::Load($intId);

				// TableUserStat was found -- return it!
				if ($objTableUserStat)
					return new TableUserStatMetaControl($objParentObject, $objTableUserStat);

				// If CreateOnRecordNotFound not specified, throw an exception
				else if ($intCreateType != QMetaControlCreateType::CreateOnRecordNotFound)
					throw new QCallerException('Could not find a TableUserStat object with PK arguments: ' . $intId);

			// If EditOnly is specified, throw an exception
			} else if ($intCreateType == QMetaControlCreateType::EditOnly)
				throw new QCallerException('No PK arguments specified');

			// If we are here, then we need to create a new record
			return new TableUserStatMetaControl($objParentObject, new TableUserStat());
		}

		/**
		 * Static Helper Method to Create using PathInfo arguments
		 *
		 * @param mixed $objParentObject QForm or QPanel which will be using this TableUserStatMetaControl
		 * @param QMetaControlCreateType $intCreateType rules governing TableUserStat object creation - defaults to CreateOrEdit
		 * @return TableUserStatMetaControl
		 */
		public static function CreateFromPathInfo($objParentObject, $intCreateType = QMetaControlCreateType::CreateOrEdit) {
			$intId = QApplication::PathInfo(0);
			return TableUserStatMetaControl::Create($objParentObject, $intId, $intCreateType);
		}

		/**
		 * Static Helper Method to Create using QueryString arguments
		 *
		 * @param mixed $objParentObject QForm or QPanel which will be using this TableUserStatMetaControl
		 * @param QMetaControlCreateType $intCreateType rules governing TableUserStat object creation - defaults to CreateOrEdit
		 * @return TableUserStatMetaControl
		 */
		public static function CreateFromQueryString($objParentObject, $intCreateType = QMetaControlCreateType::CreateOrEdit) {
			$intId = QApplication::QueryString('intId');
			return TableUserStatMetaControl::Create($objParentObject, $intId, $intCreateType);
		}



		///////////////////////////////////////////////
		// PUBLIC CREATE and REFRESH METHODS
		///////////////////////////////////////////////

		/**
		 * Create and setup QLabel lblId
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblId_Create($strControlId = null) {
			$this->lblId = new QLabel($this->objParentObject, $strControlId);
			$this->lblId->Name = QApplication::Translate('Id');
			if ($this->blnEditMode)
				$this->lblId->Text = $this->objTableUserStat->Id;
			else
				$this->lblId->Text = 'N/A';
			return $this->lblId;
		}

		/**
		 * Create and setup QListBox lstUser
		 * @param string $strControlId optional ControlId to use
		 * @return QListBox
		 */
		public function lstUser_Create($strControlId = null) {
			$this->lstUser = new QListBox($this->objParentObject, $strControlId);
			$this->lstUser->Name = QApplication::Translate('User');
			$this->lstUser->Required = true;
			if (!$this->blnEditMode)
				$this->lstUser->AddItem(QApplication::Translate('- Select One -'), null);
			$objUserArray = TableUserProject::LoadAll();
			if ($objUserArray) foreach ($objUserArray as $objUser) {
				$objListItem = new QListItem($objUser->__toString(), $objUser->Id);
				if (($this->objTableUserStat->User) && ($this->objTableUserStat->User->Id == $objUser->Id))
					$objListItem->Selected = true;
				$this->lstUser->AddItem($objListItem);
			}
			return $this->lstUser;
		}

		/**
		 * Create and setup QLabel lblUserId
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblUserId_Create($strControlId = null) {
			$this->lblUserId = new QLabel($this->objParentObject, $strControlId);
			$this->lblUserId->Name = QApplication::Translate('User');
			$this->lblUserId->Text = ($this->objTableUserStat->User) ? $this->objTableUserStat->User->__toString() : null;
			$this->lblUserId->Required = true;
			return $this->lblUserId;
		}

		/**
		 * Create and setup QFloatTextBox txtRateAverageAsBuyer
		 * @param string $strControlId optional ControlId to use
		 * @return QFloatTextBox
		 */
		public function txtRateAverageAsBuyer_Create($strControlId = null) {
			$this->txtRateAverageAsBuyer = new QFloatTextBox($this->objParentObject, $strControlId);
			$this->txtRateAverageAsBuyer->Name = QApplication::Translate('Rate Average As Buyer');
			$this->txtRateAverageAsBuyer->Text = $this->objTableUserStat->RateAverageAsBuyer;
			return $this->txtRateAverageAsBuyer;
		}

		/**
		 * Create and setup QLabel lblRateAverageAsBuyer
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblRateAverageAsBuyer_Create($strControlId = null, $strFormat = null) {
			$this->lblRateAverageAsBuyer = new QLabel($this->objParentObject, $strControlId);
			$this->lblRateAverageAsBuyer->Name = QApplication::Translate('Rate Average As Buyer');
			$this->lblRateAverageAsBuyer->Text = $this->objTableUserStat->RateAverageAsBuyer;
			$this->lblRateAverageAsBuyer->Format = $strFormat;
			return $this->lblRateAverageAsBuyer;
		}

		/**
		 * Create and setup QFloatTextBox txtRate1AverageAsBuyer
		 * @param string $strControlId optional ControlId to use
		 * @return QFloatTextBox
		 */
		public function txtRate1AverageAsBuyer_Create($strControlId = null) {
			$this->txtRate1AverageAsBuyer = new QFloatTextBox($this->objParentObject, $strControlId);
			$this->txtRate1AverageAsBuyer->Name = QApplication::Translate('Rate 1 Average As Buyer');
			$this->txtRate1AverageAsBuyer->Text = $this->objTableUserStat->Rate1AverageAsBuyer;
			return $this->txtRate1AverageAsBuyer;
		}

		/**
		 * Create and setup QLabel lblRate1AverageAsBuyer
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblRate1AverageAsBuyer_Create($strControlId = null, $strFormat = null) {
			$this->lblRate1AverageAsBuyer = new QLabel($this->objParentObject, $strControlId);
			$this->lblRate1AverageAsBuyer->Name = QApplication::Translate('Rate 1 Average As Buyer');
			$this->lblRate1AverageAsBuyer->Text = $this->objTableUserStat->Rate1AverageAsBuyer;
			$this->lblRate1AverageAsBuyer->Format = $strFormat;
			return $this->lblRate1AverageAsBuyer;
		}

		/**
		 * Create and setup QFloatTextBox txtRate2AverageAsBuyer
		 * @param string $strControlId optional ControlId to use
		 * @return QFloatTextBox
		 */
		public function txtRate2AverageAsBuyer_Create($strControlId = null) {
			$this->txtRate2AverageAsBuyer = new QFloatTextBox($this->objParentObject, $strControlId);
			$this->txtRate2AverageAsBuyer->Name = QApplication::Translate('Rate 2 Average As Buyer');
			$this->txtRate2AverageAsBuyer->Text = $this->objTableUserStat->Rate2AverageAsBuyer;
			return $this->txtRate2AverageAsBuyer;
		}

		/**
		 * Create and setup QLabel lblRate2AverageAsBuyer
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblRate2AverageAsBuyer_Create($strControlId = null, $strFormat = null) {
			$this->lblRate2AverageAsBuyer = new QLabel($this->objParentObject, $strControlId);
			$this->lblRate2AverageAsBuyer->Name = QApplication::Translate('Rate 2 Average As Buyer');
			$this->lblRate2AverageAsBuyer->Text = $this->objTableUserStat->Rate2AverageAsBuyer;
			$this->lblRate2AverageAsBuyer->Format = $strFormat;
			return $this->lblRate2AverageAsBuyer;
		}

		/**
		 * Create and setup QFloatTextBox txtRate3AverageAsBuyer
		 * @param string $strControlId optional ControlId to use
		 * @return QFloatTextBox
		 */
		public function txtRate3AverageAsBuyer_Create($strControlId = null) {
			$this->txtRate3AverageAsBuyer = new QFloatTextBox($this->objParentObject, $strControlId);
			$this->txtRate3AverageAsBuyer->Name = QApplication::Translate('Rate 3 Average As Buyer');
			$this->txtRate3AverageAsBuyer->Text = $this->objTableUserStat->Rate3AverageAsBuyer;
			return $this->txtRate3AverageAsBuyer;
		}

		/**
		 * Create and setup QLabel lblRate3AverageAsBuyer
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblRate3AverageAsBuyer_Create($strControlId = null, $strFormat = null) {
			$this->lblRate3AverageAsBuyer = new QLabel($this->objParentObject, $strControlId);
			$this->lblRate3AverageAsBuyer->Name = QApplication::Translate('Rate 3 Average As Buyer');
			$this->lblRate3AverageAsBuyer->Text = $this->objTableUserStat->Rate3AverageAsBuyer;
			$this->lblRate3AverageAsBuyer->Format = $strFormat;
			return $this->lblRate3AverageAsBuyer;
		}

		/**
		 * Create and setup QFloatTextBox txtRate4AverageAsBuyer
		 * @param string $strControlId optional ControlId to use
		 * @return QFloatTextBox
		 */
		public function txtRate4AverageAsBuyer_Create($strControlId = null) {
			$this->txtRate4AverageAsBuyer = new QFloatTextBox($this->objParentObject, $strControlId);
			$this->txtRate4AverageAsBuyer->Name = QApplication::Translate('Rate 4 Average As Buyer');
			$this->txtRate4AverageAsBuyer->Text = $this->objTableUserStat->Rate4AverageAsBuyer;
			return $this->txtRate4AverageAsBuyer;
		}

		/**
		 * Create and setup QLabel lblRate4AverageAsBuyer
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblRate4AverageAsBuyer_Create($strControlId = null, $strFormat = null) {
			$this->lblRate4AverageAsBuyer = new QLabel($this->objParentObject, $strControlId);
			$this->lblRate4AverageAsBuyer->Name = QApplication::Translate('Rate 4 Average As Buyer');
			$this->lblRate4AverageAsBuyer->Text = $this->objTableUserStat->Rate4AverageAsBuyer;
			$this->lblRate4AverageAsBuyer->Format = $strFormat;
			return $this->lblRate4AverageAsBuyer;
		}

		/**
		 * Create and setup QFloatTextBox txtRate5AverageAsBuyer
		 * @param string $strControlId optional ControlId to use
		 * @return QFloatTextBox
		 */
		public function txtRate5AverageAsBuyer_Create($strControlId = null) {
			$this->txtRate5AverageAsBuyer = new QFloatTextBox($this->objParentObject, $strControlId);
			$this->txtRate5AverageAsBuyer->Name = QApplication::Translate('Rate 5 Average As Buyer');
			$this->txtRate5AverageAsBuyer->Text = $this->objTableUserStat->Rate5AverageAsBuyer;
			return $this->txtRate5AverageAsBuyer;
		}

		/**
		 * Create and setup QLabel lblRate5AverageAsBuyer
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblRate5AverageAsBuyer_Create($strControlId = null, $strFormat = null) {
			$this->lblRate5AverageAsBuyer = new QLabel($this->objParentObject, $strControlId);
			$this->lblRate5AverageAsBuyer->Name = QApplication::Translate('Rate 5 Average As Buyer');
			$this->lblRate5AverageAsBuyer->Text = $this->objTableUserStat->Rate5AverageAsBuyer;
			$this->lblRate5AverageAsBuyer->Format = $strFormat;
			return $this->lblRate5AverageAsBuyer;
		}

		/**
		 * Create and setup QFloatTextBox txtRate6AverageAsBuyer
		 * @param string $strControlId optional ControlId to use
		 * @return QFloatTextBox
		 */
		public function txtRate6AverageAsBuyer_Create($strControlId = null) {
			$this->txtRate6AverageAsBuyer = new QFloatTextBox($this->objParentObject, $strControlId);
			$this->txtRate6AverageAsBuyer->Name = QApplication::Translate('Rate 6 Average As Buyer');
			$this->txtRate6AverageAsBuyer->Text = $this->objTableUserStat->Rate6AverageAsBuyer;
			return $this->txtRate6AverageAsBuyer;
		}

		/**
		 * Create and setup QLabel lblRate6AverageAsBuyer
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblRate6AverageAsBuyer_Create($strControlId = null, $strFormat = null) {
			$this->lblRate6AverageAsBuyer = new QLabel($this->objParentObject, $strControlId);
			$this->lblRate6AverageAsBuyer->Name = QApplication::Translate('Rate 6 Average As Buyer');
			$this->lblRate6AverageAsBuyer->Text = $this->objTableUserStat->Rate6AverageAsBuyer;
			$this->lblRate6AverageAsBuyer->Format = $strFormat;
			return $this->lblRate6AverageAsBuyer;
		}

		/**
		 * Create and setup QFloatTextBox txtRateAverageAsProvider
		 * @param string $strControlId optional ControlId to use
		 * @return QFloatTextBox
		 */
		public function txtRateAverageAsProvider_Create($strControlId = null) {
			$this->txtRateAverageAsProvider = new QFloatTextBox($this->objParentObject, $strControlId);
			$this->txtRateAverageAsProvider->Name = QApplication::Translate('Rate Average As Provider');
			$this->txtRateAverageAsProvider->Text = $this->objTableUserStat->RateAverageAsProvider;
			return $this->txtRateAverageAsProvider;
		}

		/**
		 * Create and setup QLabel lblRateAverageAsProvider
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblRateAverageAsProvider_Create($strControlId = null, $strFormat = null) {
			$this->lblRateAverageAsProvider = new QLabel($this->objParentObject, $strControlId);
			$this->lblRateAverageAsProvider->Name = QApplication::Translate('Rate Average As Provider');
			$this->lblRateAverageAsProvider->Text = $this->objTableUserStat->RateAverageAsProvider;
			$this->lblRateAverageAsProvider->Format = $strFormat;
			return $this->lblRateAverageAsProvider;
		}

		/**
		 * Create and setup QFloatTextBox txtRate1AverageAsProvider
		 * @param string $strControlId optional ControlId to use
		 * @return QFloatTextBox
		 */
		public function txtRate1AverageAsProvider_Create($strControlId = null) {
			$this->txtRate1AverageAsProvider = new QFloatTextBox($this->objParentObject, $strControlId);
			$this->txtRate1AverageAsProvider->Name = QApplication::Translate('Rate 1 Average As Provider');
			$this->txtRate1AverageAsProvider->Text = $this->objTableUserStat->Rate1AverageAsProvider;
			return $this->txtRate1AverageAsProvider;
		}

		/**
		 * Create and setup QLabel lblRate1AverageAsProvider
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblRate1AverageAsProvider_Create($strControlId = null, $strFormat = null) {
			$this->lblRate1AverageAsProvider = new QLabel($this->objParentObject, $strControlId);
			$this->lblRate1AverageAsProvider->Name = QApplication::Translate('Rate 1 Average As Provider');
			$this->lblRate1AverageAsProvider->Text = $this->objTableUserStat->Rate1AverageAsProvider;
			$this->lblRate1AverageAsProvider->Format = $strFormat;
			return $this->lblRate1AverageAsProvider;
		}

		/**
		 * Create and setup QFloatTextBox txtRate2AverageAsProvider
		 * @param string $strControlId optional ControlId to use
		 * @return QFloatTextBox
		 */
		public function txtRate2AverageAsProvider_Create($strControlId = null) {
			$this->txtRate2AverageAsProvider = new QFloatTextBox($this->objParentObject, $strControlId);
			$this->txtRate2AverageAsProvider->Name = QApplication::Translate('Rate 2 Average As Provider');
			$this->txtRate2AverageAsProvider->Text = $this->objTableUserStat->Rate2AverageAsProvider;
			return $this->txtRate2AverageAsProvider;
		}

		/**
		 * Create and setup QLabel lblRate2AverageAsProvider
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblRate2AverageAsProvider_Create($strControlId = null, $strFormat = null) {
			$this->lblRate2AverageAsProvider = new QLabel($this->objParentObject, $strControlId);
			$this->lblRate2AverageAsProvider->Name = QApplication::Translate('Rate 2 Average As Provider');
			$this->lblRate2AverageAsProvider->Text = $this->objTableUserStat->Rate2AverageAsProvider;
			$this->lblRate2AverageAsProvider->Format = $strFormat;
			return $this->lblRate2AverageAsProvider;
		}

		/**
		 * Create and setup QFloatTextBox txtRate3AverageAsProvider
		 * @param string $strControlId optional ControlId to use
		 * @return QFloatTextBox
		 */
		public function txtRate3AverageAsProvider_Create($strControlId = null) {
			$this->txtRate3AverageAsProvider = new QFloatTextBox($this->objParentObject, $strControlId);
			$this->txtRate3AverageAsProvider->Name = QApplication::Translate('Rate 3 Average As Provider');
			$this->txtRate3AverageAsProvider->Text = $this->objTableUserStat->Rate3AverageAsProvider;
			return $this->txtRate3AverageAsProvider;
		}

		/**
		 * Create and setup QLabel lblRate3AverageAsProvider
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblRate3AverageAsProvider_Create($strControlId = null, $strFormat = null) {
			$this->lblRate3AverageAsProvider = new QLabel($this->objParentObject, $strControlId);
			$this->lblRate3AverageAsProvider->Name = QApplication::Translate('Rate 3 Average As Provider');
			$this->lblRate3AverageAsProvider->Text = $this->objTableUserStat->Rate3AverageAsProvider;
			$this->lblRate3AverageAsProvider->Format = $strFormat;
			return $this->lblRate3AverageAsProvider;
		}

		/**
		 * Create and setup QFloatTextBox txtRate4AverageAsProvider
		 * @param string $strControlId optional ControlId to use
		 * @return QFloatTextBox
		 */
		public function txtRate4AverageAsProvider_Create($strControlId = null) {
			$this->txtRate4AverageAsProvider = new QFloatTextBox($this->objParentObject, $strControlId);
			$this->txtRate4AverageAsProvider->Name = QApplication::Translate('Rate 4 Average As Provider');
			$this->txtRate4AverageAsProvider->Text = $this->objTableUserStat->Rate4AverageAsProvider;
			return $this->txtRate4AverageAsProvider;
		}

		/**
		 * Create and setup QLabel lblRate4AverageAsProvider
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblRate4AverageAsProvider_Create($strControlId = null, $strFormat = null) {
			$this->lblRate4AverageAsProvider = new QLabel($this->objParentObject, $strControlId);
			$this->lblRate4AverageAsProvider->Name = QApplication::Translate('Rate 4 Average As Provider');
			$this->lblRate4AverageAsProvider->Text = $this->objTableUserStat->Rate4AverageAsProvider;
			$this->lblRate4AverageAsProvider->Format = $strFormat;
			return $this->lblRate4AverageAsProvider;
		}

		/**
		 * Create and setup QFloatTextBox txtRate5AverageAsProvider
		 * @param string $strControlId optional ControlId to use
		 * @return QFloatTextBox
		 */
		public function txtRate5AverageAsProvider_Create($strControlId = null) {
			$this->txtRate5AverageAsProvider = new QFloatTextBox($this->objParentObject, $strControlId);
			$this->txtRate5AverageAsProvider->Name = QApplication::Translate('Rate 5 Average As Provider');
			$this->txtRate5AverageAsProvider->Text = $this->objTableUserStat->Rate5AverageAsProvider;
			return $this->txtRate5AverageAsProvider;
		}

		/**
		 * Create and setup QLabel lblRate5AverageAsProvider
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblRate5AverageAsProvider_Create($strControlId = null, $strFormat = null) {
			$this->lblRate5AverageAsProvider = new QLabel($this->objParentObject, $strControlId);
			$this->lblRate5AverageAsProvider->Name = QApplication::Translate('Rate 5 Average As Provider');
			$this->lblRate5AverageAsProvider->Text = $this->objTableUserStat->Rate5AverageAsProvider;
			$this->lblRate5AverageAsProvider->Format = $strFormat;
			return $this->lblRate5AverageAsProvider;
		}

		/**
		 * Create and setup QFloatTextBox txtRate6AverageAsProvider
		 * @param string $strControlId optional ControlId to use
		 * @return QFloatTextBox
		 */
		public function txtRate6AverageAsProvider_Create($strControlId = null) {
			$this->txtRate6AverageAsProvider = new QFloatTextBox($this->objParentObject, $strControlId);
			$this->txtRate6AverageAsProvider->Name = QApplication::Translate('Rate 6 Average As Provider');
			$this->txtRate6AverageAsProvider->Text = $this->objTableUserStat->Rate6AverageAsProvider;
			return $this->txtRate6AverageAsProvider;
		}

		/**
		 * Create and setup QLabel lblRate6AverageAsProvider
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblRate6AverageAsProvider_Create($strControlId = null, $strFormat = null) {
			$this->lblRate6AverageAsProvider = new QLabel($this->objParentObject, $strControlId);
			$this->lblRate6AverageAsProvider->Name = QApplication::Translate('Rate 6 Average As Provider');
			$this->lblRate6AverageAsProvider->Text = $this->objTableUserStat->Rate6AverageAsProvider;
			$this->lblRate6AverageAsProvider->Format = $strFormat;
			return $this->lblRate6AverageAsProvider;
		}

		/**
		 * Create and setup QIntegerTextBox txtBudgetTotal
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtBudgetTotal_Create($strControlId = null) {
			$this->txtBudgetTotal = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtBudgetTotal->Name = QApplication::Translate('Budget Total');
			$this->txtBudgetTotal->Text = $this->objTableUserStat->BudgetTotal;
			$this->txtBudgetTotal->Required = true;
			return $this->txtBudgetTotal;
		}

		/**
		 * Create and setup QLabel lblBudgetTotal
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblBudgetTotal_Create($strControlId = null, $strFormat = null) {
			$this->lblBudgetTotal = new QLabel($this->objParentObject, $strControlId);
			$this->lblBudgetTotal->Name = QApplication::Translate('Budget Total');
			$this->lblBudgetTotal->Text = $this->objTableUserStat->BudgetTotal;
			$this->lblBudgetTotal->Required = true;
			$this->lblBudgetTotal->Format = $strFormat;
			return $this->lblBudgetTotal;
		}

		/**
		 * Create and setup QIntegerTextBox txtPaidTotal
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtPaidTotal_Create($strControlId = null) {
			$this->txtPaidTotal = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtPaidTotal->Name = QApplication::Translate('Paid Total');
			$this->txtPaidTotal->Text = $this->objTableUserStat->PaidTotal;
			$this->txtPaidTotal->Required = true;
			return $this->txtPaidTotal;
		}

		/**
		 * Create and setup QLabel lblPaidTotal
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblPaidTotal_Create($strControlId = null, $strFormat = null) {
			$this->lblPaidTotal = new QLabel($this->objParentObject, $strControlId);
			$this->lblPaidTotal->Name = QApplication::Translate('Paid Total');
			$this->lblPaidTotal->Text = $this->objTableUserStat->PaidTotal;
			$this->lblPaidTotal->Required = true;
			$this->lblPaidTotal->Format = $strFormat;
			return $this->lblPaidTotal;
		}

		/**
		 * Create and setup QIntegerTextBox txtEarnTotal
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtEarnTotal_Create($strControlId = null) {
			$this->txtEarnTotal = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtEarnTotal->Name = QApplication::Translate('Earn Total');
			$this->txtEarnTotal->Text = $this->objTableUserStat->EarnTotal;
			$this->txtEarnTotal->Required = true;
			return $this->txtEarnTotal;
		}

		/**
		 * Create and setup QLabel lblEarnTotal
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblEarnTotal_Create($strControlId = null, $strFormat = null) {
			$this->lblEarnTotal = new QLabel($this->objParentObject, $strControlId);
			$this->lblEarnTotal->Name = QApplication::Translate('Earn Total');
			$this->lblEarnTotal->Text = $this->objTableUserStat->EarnTotal;
			$this->lblEarnTotal->Required = true;
			$this->lblEarnTotal->Format = $strFormat;
			return $this->lblEarnTotal;
		}

		/**
		 * Create and setup QIntegerTextBox txtBidTotal
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtBidTotal_Create($strControlId = null) {
			$this->txtBidTotal = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtBidTotal->Name = QApplication::Translate('Bid Total');
			$this->txtBidTotal->Text = $this->objTableUserStat->BidTotal;
			$this->txtBidTotal->Required = true;
			return $this->txtBidTotal;
		}

		/**
		 * Create and setup QLabel lblBidTotal
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblBidTotal_Create($strControlId = null, $strFormat = null) {
			$this->lblBidTotal = new QLabel($this->objParentObject, $strControlId);
			$this->lblBidTotal->Name = QApplication::Translate('Bid Total');
			$this->lblBidTotal->Text = $this->objTableUserStat->BidTotal;
			$this->lblBidTotal->Required = true;
			$this->lblBidTotal->Format = $strFormat;
			return $this->lblBidTotal;
		}

		/**
		 * Create and setup QIntegerTextBox txtDaysTotal
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtDaysTotal_Create($strControlId = null) {
			$this->txtDaysTotal = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtDaysTotal->Name = QApplication::Translate('Days Total');
			$this->txtDaysTotal->Text = $this->objTableUserStat->DaysTotal;
			$this->txtDaysTotal->Required = true;
			return $this->txtDaysTotal;
		}

		/**
		 * Create and setup QLabel lblDaysTotal
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblDaysTotal_Create($strControlId = null, $strFormat = null) {
			$this->lblDaysTotal = new QLabel($this->objParentObject, $strControlId);
			$this->lblDaysTotal->Name = QApplication::Translate('Days Total');
			$this->lblDaysTotal->Text = $this->objTableUserStat->DaysTotal;
			$this->lblDaysTotal->Required = true;
			$this->lblDaysTotal->Format = $strFormat;
			return $this->lblDaysTotal;
		}

		/**
		 * Create and setup QIntegerTextBox txtDaysFinalTotal
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtDaysFinalTotal_Create($strControlId = null) {
			$this->txtDaysFinalTotal = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtDaysFinalTotal->Name = QApplication::Translate('Days Final Total');
			$this->txtDaysFinalTotal->Text = $this->objTableUserStat->DaysFinalTotal;
			$this->txtDaysFinalTotal->Required = true;
			return $this->txtDaysFinalTotal;
		}

		/**
		 * Create and setup QLabel lblDaysFinalTotal
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblDaysFinalTotal_Create($strControlId = null, $strFormat = null) {
			$this->lblDaysFinalTotal = new QLabel($this->objParentObject, $strControlId);
			$this->lblDaysFinalTotal->Name = QApplication::Translate('Days Final Total');
			$this->lblDaysFinalTotal->Text = $this->objTableUserStat->DaysFinalTotal;
			$this->lblDaysFinalTotal->Required = true;
			$this->lblDaysFinalTotal->Format = $strFormat;
			return $this->lblDaysFinalTotal;
		}

		/**
		 * Create and setup QFloatTextBox txtRatioBudgetPaid
		 * @param string $strControlId optional ControlId to use
		 * @return QFloatTextBox
		 */
		public function txtRatioBudgetPaid_Create($strControlId = null) {
			$this->txtRatioBudgetPaid = new QFloatTextBox($this->objParentObject, $strControlId);
			$this->txtRatioBudgetPaid->Name = QApplication::Translate('Ratio Budget Paid');
			$this->txtRatioBudgetPaid->Text = $this->objTableUserStat->RatioBudgetPaid;
			return $this->txtRatioBudgetPaid;
		}

		/**
		 * Create and setup QLabel lblRatioBudgetPaid
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblRatioBudgetPaid_Create($strControlId = null, $strFormat = null) {
			$this->lblRatioBudgetPaid = new QLabel($this->objParentObject, $strControlId);
			$this->lblRatioBudgetPaid->Name = QApplication::Translate('Ratio Budget Paid');
			$this->lblRatioBudgetPaid->Text = $this->objTableUserStat->RatioBudgetPaid;
			$this->lblRatioBudgetPaid->Format = $strFormat;
			return $this->lblRatioBudgetPaid;
		}

		/**
		 * Create and setup QFloatTextBox txtRatioBidEarn
		 * @param string $strControlId optional ControlId to use
		 * @return QFloatTextBox
		 */
		public function txtRatioBidEarn_Create($strControlId = null) {
			$this->txtRatioBidEarn = new QFloatTextBox($this->objParentObject, $strControlId);
			$this->txtRatioBidEarn->Name = QApplication::Translate('Ratio Bid Earn');
			$this->txtRatioBidEarn->Text = $this->objTableUserStat->RatioBidEarn;
			return $this->txtRatioBidEarn;
		}

		/**
		 * Create and setup QLabel lblRatioBidEarn
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblRatioBidEarn_Create($strControlId = null, $strFormat = null) {
			$this->lblRatioBidEarn = new QLabel($this->objParentObject, $strControlId);
			$this->lblRatioBidEarn->Name = QApplication::Translate('Ratio Bid Earn');
			$this->lblRatioBidEarn->Text = $this->objTableUserStat->RatioBidEarn;
			$this->lblRatioBidEarn->Format = $strFormat;
			return $this->lblRatioBidEarn;
		}

		/**
		 * Create and setup QFloatTextBox txtRatioDays
		 * @param string $strControlId optional ControlId to use
		 * @return QFloatTextBox
		 */
		public function txtRatioDays_Create($strControlId = null) {
			$this->txtRatioDays = new QFloatTextBox($this->objParentObject, $strControlId);
			$this->txtRatioDays->Name = QApplication::Translate('Ratio Days');
			$this->txtRatioDays->Text = $this->objTableUserStat->RatioDays;
			return $this->txtRatioDays;
		}

		/**
		 * Create and setup QLabel lblRatioDays
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblRatioDays_Create($strControlId = null, $strFormat = null) {
			$this->lblRatioDays = new QLabel($this->objParentObject, $strControlId);
			$this->lblRatioDays->Name = QApplication::Translate('Ratio Days');
			$this->lblRatioDays->Text = $this->objTableUserStat->RatioDays;
			$this->lblRatioDays->Format = $strFormat;
			return $this->lblRatioDays;
		}

		/**
		 * Create and setup QDateTimePicker calUpdateDate
		 * @param string $strControlId optional ControlId to use
		 * @return QDateTimePicker
		 */
		public function calUpdateDate_Create($strControlId = null) {
			$this->calUpdateDate = new QDateTimePicker($this->objParentObject, $strControlId);
			$this->calUpdateDate->Name = QApplication::Translate('Update Date');
			$this->calUpdateDate->DateTime = $this->objTableUserStat->UpdateDate;
			$this->calUpdateDate->DateTimePickerType = QDateTimePickerType::DateTime;
			return $this->calUpdateDate;
		}

		/**
		 * Create and setup QLabel lblUpdateDate
		 * @param string $strControlId optional ControlId to use
		 * @param string $strDateTimeFormat optional DateTimeFormat to use
		 * @return QLabel
		 */
		public function lblUpdateDate_Create($strControlId = null, $strDateTimeFormat = null) {
			$this->lblUpdateDate = new QLabel($this->objParentObject, $strControlId);
			$this->lblUpdateDate->Name = QApplication::Translate('Update Date');
			$this->strUpdateDateDateTimeFormat = $strDateTimeFormat;
			$this->lblUpdateDate->Text = sprintf($this->objTableUserStat->UpdateDate) ? $this->objTableUserStat->UpdateDate->__toString($this->strUpdateDateDateTimeFormat) : null;
			return $this->lblUpdateDate;
		}

		protected $strUpdateDateDateTimeFormat;




		/**
		 * Refresh this MetaControl with Data from the local TableUserStat object.
		 * @param boolean $blnReload reload TableUserStat from the database
		 * @return void
		 */
		public function Refresh($blnReload = false) {
			if ($blnReload)
				$this->objTableUserStat->Reload();

			if ($this->lblId) if ($this->blnEditMode) $this->lblId->Text = $this->objTableUserStat->Id;

			if ($this->lstUser) {
					$this->lstUser->RemoveAllItems();
				if (!$this->blnEditMode)
					$this->lstUser->AddItem(QApplication::Translate('- Select One -'), null);
				$objUserArray = TableUserProject::LoadAll();
				if ($objUserArray) foreach ($objUserArray as $objUser) {
					$objListItem = new QListItem($objUser->__toString(), $objUser->Id);
					if (($this->objTableUserStat->User) && ($this->objTableUserStat->User->Id == $objUser->Id))
						$objListItem->Selected = true;
					$this->lstUser->AddItem($objListItem);
				}
			}
			if ($this->lblUserId) $this->lblUserId->Text = ($this->objTableUserStat->User) ? $this->objTableUserStat->User->__toString() : null;

			if ($this->txtRateAverageAsBuyer) $this->txtRateAverageAsBuyer->Text = $this->objTableUserStat->RateAverageAsBuyer;
			if ($this->lblRateAverageAsBuyer) $this->lblRateAverageAsBuyer->Text = $this->objTableUserStat->RateAverageAsBuyer;

			if ($this->txtRate1AverageAsBuyer) $this->txtRate1AverageAsBuyer->Text = $this->objTableUserStat->Rate1AverageAsBuyer;
			if ($this->lblRate1AverageAsBuyer) $this->lblRate1AverageAsBuyer->Text = $this->objTableUserStat->Rate1AverageAsBuyer;

			if ($this->txtRate2AverageAsBuyer) $this->txtRate2AverageAsBuyer->Text = $this->objTableUserStat->Rate2AverageAsBuyer;
			if ($this->lblRate2AverageAsBuyer) $this->lblRate2AverageAsBuyer->Text = $this->objTableUserStat->Rate2AverageAsBuyer;

			if ($this->txtRate3AverageAsBuyer) $this->txtRate3AverageAsBuyer->Text = $this->objTableUserStat->Rate3AverageAsBuyer;
			if ($this->lblRate3AverageAsBuyer) $this->lblRate3AverageAsBuyer->Text = $this->objTableUserStat->Rate3AverageAsBuyer;

			if ($this->txtRate4AverageAsBuyer) $this->txtRate4AverageAsBuyer->Text = $this->objTableUserStat->Rate4AverageAsBuyer;
			if ($this->lblRate4AverageAsBuyer) $this->lblRate4AverageAsBuyer->Text = $this->objTableUserStat->Rate4AverageAsBuyer;

			if ($this->txtRate5AverageAsBuyer) $this->txtRate5AverageAsBuyer->Text = $this->objTableUserStat->Rate5AverageAsBuyer;
			if ($this->lblRate5AverageAsBuyer) $this->lblRate5AverageAsBuyer->Text = $this->objTableUserStat->Rate5AverageAsBuyer;

			if ($this->txtRate6AverageAsBuyer) $this->txtRate6AverageAsBuyer->Text = $this->objTableUserStat->Rate6AverageAsBuyer;
			if ($this->lblRate6AverageAsBuyer) $this->lblRate6AverageAsBuyer->Text = $this->objTableUserStat->Rate6AverageAsBuyer;

			if ($this->txtRateAverageAsProvider) $this->txtRateAverageAsProvider->Text = $this->objTableUserStat->RateAverageAsProvider;
			if ($this->lblRateAverageAsProvider) $this->lblRateAverageAsProvider->Text = $this->objTableUserStat->RateAverageAsProvider;

			if ($this->txtRate1AverageAsProvider) $this->txtRate1AverageAsProvider->Text = $this->objTableUserStat->Rate1AverageAsProvider;
			if ($this->lblRate1AverageAsProvider) $this->lblRate1AverageAsProvider->Text = $this->objTableUserStat->Rate1AverageAsProvider;

			if ($this->txtRate2AverageAsProvider) $this->txtRate2AverageAsProvider->Text = $this->objTableUserStat->Rate2AverageAsProvider;
			if ($this->lblRate2AverageAsProvider) $this->lblRate2AverageAsProvider->Text = $this->objTableUserStat->Rate2AverageAsProvider;

			if ($this->txtRate3AverageAsProvider) $this->txtRate3AverageAsProvider->Text = $this->objTableUserStat->Rate3AverageAsProvider;
			if ($this->lblRate3AverageAsProvider) $this->lblRate3AverageAsProvider->Text = $this->objTableUserStat->Rate3AverageAsProvider;

			if ($this->txtRate4AverageAsProvider) $this->txtRate4AverageAsProvider->Text = $this->objTableUserStat->Rate4AverageAsProvider;
			if ($this->lblRate4AverageAsProvider) $this->lblRate4AverageAsProvider->Text = $this->objTableUserStat->Rate4AverageAsProvider;

			if ($this->txtRate5AverageAsProvider) $this->txtRate5AverageAsProvider->Text = $this->objTableUserStat->Rate5AverageAsProvider;
			if ($this->lblRate5AverageAsProvider) $this->lblRate5AverageAsProvider->Text = $this->objTableUserStat->Rate5AverageAsProvider;

			if ($this->txtRate6AverageAsProvider) $this->txtRate6AverageAsProvider->Text = $this->objTableUserStat->Rate6AverageAsProvider;
			if ($this->lblRate6AverageAsProvider) $this->lblRate6AverageAsProvider->Text = $this->objTableUserStat->Rate6AverageAsProvider;

			if ($this->txtBudgetTotal) $this->txtBudgetTotal->Text = $this->objTableUserStat->BudgetTotal;
			if ($this->lblBudgetTotal) $this->lblBudgetTotal->Text = $this->objTableUserStat->BudgetTotal;

			if ($this->txtPaidTotal) $this->txtPaidTotal->Text = $this->objTableUserStat->PaidTotal;
			if ($this->lblPaidTotal) $this->lblPaidTotal->Text = $this->objTableUserStat->PaidTotal;

			if ($this->txtEarnTotal) $this->txtEarnTotal->Text = $this->objTableUserStat->EarnTotal;
			if ($this->lblEarnTotal) $this->lblEarnTotal->Text = $this->objTableUserStat->EarnTotal;

			if ($this->txtBidTotal) $this->txtBidTotal->Text = $this->objTableUserStat->BidTotal;
			if ($this->lblBidTotal) $this->lblBidTotal->Text = $this->objTableUserStat->BidTotal;

			if ($this->txtDaysTotal) $this->txtDaysTotal->Text = $this->objTableUserStat->DaysTotal;
			if ($this->lblDaysTotal) $this->lblDaysTotal->Text = $this->objTableUserStat->DaysTotal;

			if ($this->txtDaysFinalTotal) $this->txtDaysFinalTotal->Text = $this->objTableUserStat->DaysFinalTotal;
			if ($this->lblDaysFinalTotal) $this->lblDaysFinalTotal->Text = $this->objTableUserStat->DaysFinalTotal;

			if ($this->txtRatioBudgetPaid) $this->txtRatioBudgetPaid->Text = $this->objTableUserStat->RatioBudgetPaid;
			if ($this->lblRatioBudgetPaid) $this->lblRatioBudgetPaid->Text = $this->objTableUserStat->RatioBudgetPaid;

			if ($this->txtRatioBidEarn) $this->txtRatioBidEarn->Text = $this->objTableUserStat->RatioBidEarn;
			if ($this->lblRatioBidEarn) $this->lblRatioBidEarn->Text = $this->objTableUserStat->RatioBidEarn;

			if ($this->txtRatioDays) $this->txtRatioDays->Text = $this->objTableUserStat->RatioDays;
			if ($this->lblRatioDays) $this->lblRatioDays->Text = $this->objTableUserStat->RatioDays;

			if ($this->calUpdateDate) $this->calUpdateDate->DateTime = $this->objTableUserStat->UpdateDate;
			if ($this->lblUpdateDate) $this->lblUpdateDate->Text = sprintf($this->objTableUserStat->UpdateDate) ? $this->objTableUserStat->UpdateDate->__toString($this->strUpdateDateDateTimeFormat) : null;

		}



		///////////////////////////////////////////////
		// PROTECTED UPDATE METHODS for ManyToManyReferences (if any)
		///////////////////////////////////////////////





		///////////////////////////////////////////////
		// PUBLIC TABLEUSERSTAT OBJECT MANIPULATORS
		///////////////////////////////////////////////

		/**
		 * This will save this object's TableUserStat instance,
		 * updating only the fields which have had a control created for it.
		 */
		public function SaveTableUserStat() {
			try {
				// Update any fields for controls that have been created
				if ($this->lstUser) $this->objTableUserStat->UserId = $this->lstUser->SelectedValue;
				if ($this->txtRateAverageAsBuyer) $this->objTableUserStat->RateAverageAsBuyer = $this->txtRateAverageAsBuyer->Text;
				if ($this->txtRate1AverageAsBuyer) $this->objTableUserStat->Rate1AverageAsBuyer = $this->txtRate1AverageAsBuyer->Text;
				if ($this->txtRate2AverageAsBuyer) $this->objTableUserStat->Rate2AverageAsBuyer = $this->txtRate2AverageAsBuyer->Text;
				if ($this->txtRate3AverageAsBuyer) $this->objTableUserStat->Rate3AverageAsBuyer = $this->txtRate3AverageAsBuyer->Text;
				if ($this->txtRate4AverageAsBuyer) $this->objTableUserStat->Rate4AverageAsBuyer = $this->txtRate4AverageAsBuyer->Text;
				if ($this->txtRate5AverageAsBuyer) $this->objTableUserStat->Rate5AverageAsBuyer = $this->txtRate5AverageAsBuyer->Text;
				if ($this->txtRate6AverageAsBuyer) $this->objTableUserStat->Rate6AverageAsBuyer = $this->txtRate6AverageAsBuyer->Text;
				if ($this->txtRateAverageAsProvider) $this->objTableUserStat->RateAverageAsProvider = $this->txtRateAverageAsProvider->Text;
				if ($this->txtRate1AverageAsProvider) $this->objTableUserStat->Rate1AverageAsProvider = $this->txtRate1AverageAsProvider->Text;
				if ($this->txtRate2AverageAsProvider) $this->objTableUserStat->Rate2AverageAsProvider = $this->txtRate2AverageAsProvider->Text;
				if ($this->txtRate3AverageAsProvider) $this->objTableUserStat->Rate3AverageAsProvider = $this->txtRate3AverageAsProvider->Text;
				if ($this->txtRate4AverageAsProvider) $this->objTableUserStat->Rate4AverageAsProvider = $this->txtRate4AverageAsProvider->Text;
				if ($this->txtRate5AverageAsProvider) $this->objTableUserStat->Rate5AverageAsProvider = $this->txtRate5AverageAsProvider->Text;
				if ($this->txtRate6AverageAsProvider) $this->objTableUserStat->Rate6AverageAsProvider = $this->txtRate6AverageAsProvider->Text;
				if ($this->txtBudgetTotal) $this->objTableUserStat->BudgetTotal = $this->txtBudgetTotal->Text;
				if ($this->txtPaidTotal) $this->objTableUserStat->PaidTotal = $this->txtPaidTotal->Text;
				if ($this->txtEarnTotal) $this->objTableUserStat->EarnTotal = $this->txtEarnTotal->Text;
				if ($this->txtBidTotal) $this->objTableUserStat->BidTotal = $this->txtBidTotal->Text;
				if ($this->txtDaysTotal) $this->objTableUserStat->DaysTotal = $this->txtDaysTotal->Text;
				if ($this->txtDaysFinalTotal) $this->objTableUserStat->DaysFinalTotal = $this->txtDaysFinalTotal->Text;
				if ($this->txtRatioBudgetPaid) $this->objTableUserStat->RatioBudgetPaid = $this->txtRatioBudgetPaid->Text;
				if ($this->txtRatioBidEarn) $this->objTableUserStat->RatioBidEarn = $this->txtRatioBidEarn->Text;
				if ($this->txtRatioDays) $this->objTableUserStat->RatioDays = $this->txtRatioDays->Text;
				if ($this->calUpdateDate) $this->objTableUserStat->UpdateDate = $this->calUpdateDate->DateTime;

				// Update any UniqueReverseReferences (if any) for controls that have been created for it

				// Save the TableUserStat object
				$this->objTableUserStat->Save();

				// Finally, update any ManyToManyReferences (if any)
			} catch (QCallerException $objExc) {
				$objExc->IncrementOffset();
				throw $objExc;
			}
		}

		/**
		 * This will DELETE this object's TableUserStat instance from the database.
		 * It will also unassociate itself from any ManyToManyReferences.
		 */
		public function DeleteTableUserStat() {
			$this->objTableUserStat->Delete();
		}		



		///////////////////////////////////////////////
		// PUBLIC GETTERS and SETTERS
		///////////////////////////////////////////////

		/**
		 * Override method to perform a property "Get"
		 * This will get the value of $strName
		 *
		 * @param string $strName Name of the property to get
		 * @return mixed
		 */
		public function __get($strName) {
			switch ($strName) {
				// General MetaControlVariables
				case 'TableUserStat': return $this->objTableUserStat;
				case 'TitleVerb': return $this->strTitleVerb;
				case 'EditMode': return $this->blnEditMode;

				// Controls that point to TableUserStat fields -- will be created dynamically if not yet created
				case 'IdControl':
					if (!$this->lblId) return $this->lblId_Create();
					return $this->lblId;
				case 'IdLabel':
					if (!$this->lblId) return $this->lblId_Create();
					return $this->lblId;
				case 'UserIdControl':
					if (!$this->lstUser) return $this->lstUser_Create();
					return $this->lstUser;
				case 'UserIdLabel':
					if (!$this->lblUserId) return $this->lblUserId_Create();
					return $this->lblUserId;
				case 'RateAverageAsBuyerControl':
					if (!$this->txtRateAverageAsBuyer) return $this->txtRateAverageAsBuyer_Create();
					return $this->txtRateAverageAsBuyer;
				case 'RateAverageAsBuyerLabel':
					if (!$this->lblRateAverageAsBuyer) return $this->lblRateAverageAsBuyer_Create();
					return $this->lblRateAverageAsBuyer;
				case 'Rate1AverageAsBuyerControl':
					if (!$this->txtRate1AverageAsBuyer) return $this->txtRate1AverageAsBuyer_Create();
					return $this->txtRate1AverageAsBuyer;
				case 'Rate1AverageAsBuyerLabel':
					if (!$this->lblRate1AverageAsBuyer) return $this->lblRate1AverageAsBuyer_Create();
					return $this->lblRate1AverageAsBuyer;
				case 'Rate2AverageAsBuyerControl':
					if (!$this->txtRate2AverageAsBuyer) return $this->txtRate2AverageAsBuyer_Create();
					return $this->txtRate2AverageAsBuyer;
				case 'Rate2AverageAsBuyerLabel':
					if (!$this->lblRate2AverageAsBuyer) return $this->lblRate2AverageAsBuyer_Create();
					return $this->lblRate2AverageAsBuyer;
				case 'Rate3AverageAsBuyerControl':
					if (!$this->txtRate3AverageAsBuyer) return $this->txtRate3AverageAsBuyer_Create();
					return $this->txtRate3AverageAsBuyer;
				case 'Rate3AverageAsBuyerLabel':
					if (!$this->lblRate3AverageAsBuyer) return $this->lblRate3AverageAsBuyer_Create();
					return $this->lblRate3AverageAsBuyer;
				case 'Rate4AverageAsBuyerControl':
					if (!$this->txtRate4AverageAsBuyer) return $this->txtRate4AverageAsBuyer_Create();
					return $this->txtRate4AverageAsBuyer;
				case 'Rate4AverageAsBuyerLabel':
					if (!$this->lblRate4AverageAsBuyer) return $this->lblRate4AverageAsBuyer_Create();
					return $this->lblRate4AverageAsBuyer;
				case 'Rate5AverageAsBuyerControl':
					if (!$this->txtRate5AverageAsBuyer) return $this->txtRate5AverageAsBuyer_Create();
					return $this->txtRate5AverageAsBuyer;
				case 'Rate5AverageAsBuyerLabel':
					if (!$this->lblRate5AverageAsBuyer) return $this->lblRate5AverageAsBuyer_Create();
					return $this->lblRate5AverageAsBuyer;
				case 'Rate6AverageAsBuyerControl':
					if (!$this->txtRate6AverageAsBuyer) return $this->txtRate6AverageAsBuyer_Create();
					return $this->txtRate6AverageAsBuyer;
				case 'Rate6AverageAsBuyerLabel':
					if (!$this->lblRate6AverageAsBuyer) return $this->lblRate6AverageAsBuyer_Create();
					return $this->lblRate6AverageAsBuyer;
				case 'RateAverageAsProviderControl':
					if (!$this->txtRateAverageAsProvider) return $this->txtRateAverageAsProvider_Create();
					return $this->txtRateAverageAsProvider;
				case 'RateAverageAsProviderLabel':
					if (!$this->lblRateAverageAsProvider) return $this->lblRateAverageAsProvider_Create();
					return $this->lblRateAverageAsProvider;
				case 'Rate1AverageAsProviderControl':
					if (!$this->txtRate1AverageAsProvider) return $this->txtRate1AverageAsProvider_Create();
					return $this->txtRate1AverageAsProvider;
				case 'Rate1AverageAsProviderLabel':
					if (!$this->lblRate1AverageAsProvider) return $this->lblRate1AverageAsProvider_Create();
					return $this->lblRate1AverageAsProvider;
				case 'Rate2AverageAsProviderControl':
					if (!$this->txtRate2AverageAsProvider) return $this->txtRate2AverageAsProvider_Create();
					return $this->txtRate2AverageAsProvider;
				case 'Rate2AverageAsProviderLabel':
					if (!$this->lblRate2AverageAsProvider) return $this->lblRate2AverageAsProvider_Create();
					return $this->lblRate2AverageAsProvider;
				case 'Rate3AverageAsProviderControl':
					if (!$this->txtRate3AverageAsProvider) return $this->txtRate3AverageAsProvider_Create();
					return $this->txtRate3AverageAsProvider;
				case 'Rate3AverageAsProviderLabel':
					if (!$this->lblRate3AverageAsProvider) return $this->lblRate3AverageAsProvider_Create();
					return $this->lblRate3AverageAsProvider;
				case 'Rate4AverageAsProviderControl':
					if (!$this->txtRate4AverageAsProvider) return $this->txtRate4AverageAsProvider_Create();
					return $this->txtRate4AverageAsProvider;
				case 'Rate4AverageAsProviderLabel':
					if (!$this->lblRate4AverageAsProvider) return $this->lblRate4AverageAsProvider_Create();
					return $this->lblRate4AverageAsProvider;
				case 'Rate5AverageAsProviderControl':
					if (!$this->txtRate5AverageAsProvider) return $this->txtRate5AverageAsProvider_Create();
					return $this->txtRate5AverageAsProvider;
				case 'Rate5AverageAsProviderLabel':
					if (!$this->lblRate5AverageAsProvider) return $this->lblRate5AverageAsProvider_Create();
					return $this->lblRate5AverageAsProvider;
				case 'Rate6AverageAsProviderControl':
					if (!$this->txtRate6AverageAsProvider) return $this->txtRate6AverageAsProvider_Create();
					return $this->txtRate6AverageAsProvider;
				case 'Rate6AverageAsProviderLabel':
					if (!$this->lblRate6AverageAsProvider) return $this->lblRate6AverageAsProvider_Create();
					return $this->lblRate6AverageAsProvider;
				case 'BudgetTotalControl':
					if (!$this->txtBudgetTotal) return $this->txtBudgetTotal_Create();
					return $this->txtBudgetTotal;
				case 'BudgetTotalLabel':
					if (!$this->lblBudgetTotal) return $this->lblBudgetTotal_Create();
					return $this->lblBudgetTotal;
				case 'PaidTotalControl':
					if (!$this->txtPaidTotal) return $this->txtPaidTotal_Create();
					return $this->txtPaidTotal;
				case 'PaidTotalLabel':
					if (!$this->lblPaidTotal) return $this->lblPaidTotal_Create();
					return $this->lblPaidTotal;
				case 'EarnTotalControl':
					if (!$this->txtEarnTotal) return $this->txtEarnTotal_Create();
					return $this->txtEarnTotal;
				case 'EarnTotalLabel':
					if (!$this->lblEarnTotal) return $this->lblEarnTotal_Create();
					return $this->lblEarnTotal;
				case 'BidTotalControl':
					if (!$this->txtBidTotal) return $this->txtBidTotal_Create();
					return $this->txtBidTotal;
				case 'BidTotalLabel':
					if (!$this->lblBidTotal) return $this->lblBidTotal_Create();
					return $this->lblBidTotal;
				case 'DaysTotalControl':
					if (!$this->txtDaysTotal) return $this->txtDaysTotal_Create();
					return $this->txtDaysTotal;
				case 'DaysTotalLabel':
					if (!$this->lblDaysTotal) return $this->lblDaysTotal_Create();
					return $this->lblDaysTotal;
				case 'DaysFinalTotalControl':
					if (!$this->txtDaysFinalTotal) return $this->txtDaysFinalTotal_Create();
					return $this->txtDaysFinalTotal;
				case 'DaysFinalTotalLabel':
					if (!$this->lblDaysFinalTotal) return $this->lblDaysFinalTotal_Create();
					return $this->lblDaysFinalTotal;
				case 'RatioBudgetPaidControl':
					if (!$this->txtRatioBudgetPaid) return $this->txtRatioBudgetPaid_Create();
					return $this->txtRatioBudgetPaid;
				case 'RatioBudgetPaidLabel':
					if (!$this->lblRatioBudgetPaid) return $this->lblRatioBudgetPaid_Create();
					return $this->lblRatioBudgetPaid;
				case 'RatioBidEarnControl':
					if (!$this->txtRatioBidEarn) return $this->txtRatioBidEarn_Create();
					return $this->txtRatioBidEarn;
				case 'RatioBidEarnLabel':
					if (!$this->lblRatioBidEarn) return $this->lblRatioBidEarn_Create();
					return $this->lblRatioBidEarn;
				case 'RatioDaysControl':
					if (!$this->txtRatioDays) return $this->txtRatioDays_Create();
					return $this->txtRatioDays;
				case 'RatioDaysLabel':
					if (!$this->lblRatioDays) return $this->lblRatioDays_Create();
					return $this->lblRatioDays;
				case 'UpdateDateControl':
					if (!$this->calUpdateDate) return $this->calUpdateDate_Create();
					return $this->calUpdateDate;
				case 'UpdateDateLabel':
					if (!$this->lblUpdateDate) return $this->lblUpdateDate_Create();
					return $this->lblUpdateDate;
				default:
					try {
						return parent::__get($strName);
					} catch (QCallerException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}
			}
		}

		/**
		 * Override method to perform a property "Set"
		 * This will set the property $strName to be $mixValue
		 *
		 * @param string $strName Name of the property to set
		 * @param string $mixValue New value of the property
		 * @return mixed
		 */
		public function __set($strName, $mixValue) {
			try {
				switch ($strName) {
					// Controls that point to TableUserStat fields
					case 'IdControl':
						return ($this->lblId = QType::Cast($mixValue, 'QControl'));
					case 'UserIdControl':
						return ($this->lstUser = QType::Cast($mixValue, 'QControl'));
					case 'RateAverageAsBuyerControl':
						return ($this->txtRateAverageAsBuyer = QType::Cast($mixValue, 'QControl'));
					case 'Rate1AverageAsBuyerControl':
						return ($this->txtRate1AverageAsBuyer = QType::Cast($mixValue, 'QControl'));
					case 'Rate2AverageAsBuyerControl':
						return ($this->txtRate2AverageAsBuyer = QType::Cast($mixValue, 'QControl'));
					case 'Rate3AverageAsBuyerControl':
						return ($this->txtRate3AverageAsBuyer = QType::Cast($mixValue, 'QControl'));
					case 'Rate4AverageAsBuyerControl':
						return ($this->txtRate4AverageAsBuyer = QType::Cast($mixValue, 'QControl'));
					case 'Rate5AverageAsBuyerControl':
						return ($this->txtRate5AverageAsBuyer = QType::Cast($mixValue, 'QControl'));
					case 'Rate6AverageAsBuyerControl':
						return ($this->txtRate6AverageAsBuyer = QType::Cast($mixValue, 'QControl'));
					case 'RateAverageAsProviderControl':
						return ($this->txtRateAverageAsProvider = QType::Cast($mixValue, 'QControl'));
					case 'Rate1AverageAsProviderControl':
						return ($this->txtRate1AverageAsProvider = QType::Cast($mixValue, 'QControl'));
					case 'Rate2AverageAsProviderControl':
						return ($this->txtRate2AverageAsProvider = QType::Cast($mixValue, 'QControl'));
					case 'Rate3AverageAsProviderControl':
						return ($this->txtRate3AverageAsProvider = QType::Cast($mixValue, 'QControl'));
					case 'Rate4AverageAsProviderControl':
						return ($this->txtRate4AverageAsProvider = QType::Cast($mixValue, 'QControl'));
					case 'Rate5AverageAsProviderControl':
						return ($this->txtRate5AverageAsProvider = QType::Cast($mixValue, 'QControl'));
					case 'Rate6AverageAsProviderControl':
						return ($this->txtRate6AverageAsProvider = QType::Cast($mixValue, 'QControl'));
					case 'BudgetTotalControl':
						return ($this->txtBudgetTotal = QType::Cast($mixValue, 'QControl'));
					case 'PaidTotalControl':
						return ($this->txtPaidTotal = QType::Cast($mixValue, 'QControl'));
					case 'EarnTotalControl':
						return ($this->txtEarnTotal = QType::Cast($mixValue, 'QControl'));
					case 'BidTotalControl':
						return ($this->txtBidTotal = QType::Cast($mixValue, 'QControl'));
					case 'DaysTotalControl':
						return ($this->txtDaysTotal = QType::Cast($mixValue, 'QControl'));
					case 'DaysFinalTotalControl':
						return ($this->txtDaysFinalTotal = QType::Cast($mixValue, 'QControl'));
					case 'RatioBudgetPaidControl':
						return ($this->txtRatioBudgetPaid = QType::Cast($mixValue, 'QControl'));
					case 'RatioBidEarnControl':
						return ($this->txtRatioBidEarn = QType::Cast($mixValue, 'QControl'));
					case 'RatioDaysControl':
						return ($this->txtRatioDays = QType::Cast($mixValue, 'QControl'));
					case 'UpdateDateControl':
						return ($this->calUpdateDate = QType::Cast($mixValue, 'QControl'));
					default:
						return parent::__set($strName, $mixValue);
				}
			} catch (QCallerException $objExc) {
				$objExc->IncrementOffset();
				throw $objExc;
			}
		}
	}
?>